<?php 
if(empty($model)):
$this->beginWidget('webroot.widgets.iPortlet', array('title'=>Yii::t('main','Sửa Bill')));
?>
<form aciton="" method="post">
<?php 

if(Yii::app()->user->hasState('msg')){
echo '<p style="color: #E72323;">'.Yii::app()->user->getState('msg').'</p>';
}
?>
<label>Nhập bill AM</label>
<input type="hidden" name="r" value="bill/bill/view"/>
<input type="textbox" name="SearchBill[bill_code]" value="" />
<button type="submit">Sửa</button>
</form>
<?php
$this->endWidget();
else:
$this->beginWidget('webroot.widgets.iPortlet', array('title'=>Yii::t('main','Chi tiết Bill').' #'.$model->am_bill));
$this->widget('zii.widgets.CDetailView', array(
	'data' => $model,
	'attributes' => array(
'id',
'am_bill',
'type',
'air_bill',
'customer_name',
'customer_address',
'receiver',
'receiver_address',
'description',
'product_weight',
'fee',
'created_datetime',
'updated_datetime',
	),
));
$this->widget('bootstrap.widgets.TbButton', array(
		'label'=>Yii::t('main','Update'),
		'type'=>'primary',
		'icon'=>'pencil white',
		'url'=> array('update', 'id'=>$model->id),
));
$this->endWidget();
endif;
?>